﻿@model LuxDiner.Model.Orders.PaidOrderModel

<div class="k-block" style="line-height: 35px; margin-bottom: 5px; padding: 0px 5px">
    <b>单据号：</b>@Model.OrderNo
    <b>日期：</b>@(string.Format("{0:yyyy年M月d日}", Model.NoteDate))
    <b>客户：</b>@Model.Customer.Corporation
    <b>备注：</b>@Model.Description
</div>

<table id="grid">
    <colgroup>
        <col style="width: 300px" />
        <col style="width: 100px" />
        <col />
    </colgroup>
    <thead>
        <tr>
            <th data-field="product">往来帐户</th>
            <th data-field="sum">金额</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var o in Model.Items)
        {
            <tr>
                <td>@o.Bank.ShowName</td>
                <td>@(string.Format("{0:c2}", o.Money))</td>
                <td></td>
            </tr>    
        }
    </tbody>
    <tfoot style="background: #eee;">
        <tr>
            <td style="text-align: right"><b>总金额:</b></td>
            <td>@(string.Format("{0:c2}", Model.TotalMoney))</td>
            <td></td>
        </tr>
    </tfoot>
</table>

<div class="k-block" style="padding: 5px; margin-top: 5px; text-align: center;">
    <a class="k-button" href="/Orders/PaidOrder/Print/@Model.OrderNo" target="_blank"><span class="k-icon k-i-calendar "></span><span>打印单据</span></a>
    &nbsp;&nbsp;
    <button class="k-button" onclick="CancelGeneralEdit();"><span class="k-icon k-i-cancel"></span><span>&nbsp;关&nbsp;闭</span></button>
</div>

<script class="init">
    $(function () {
        $("#grid").kendoGrid();
    });
</script>

